package club.xyes.zkh.ecommerce.wechat.dto;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;

/**
 * Create by 郭文梁 2019/5/7 0007 14:24
 * SaoBeiNotifyVo
 * 扫呗通知参数
 *
 * @author 郭文梁
 * @data 2019/5/7 0007
 */
@Data
public class SaoBeiNotifyVo {
    @JSONField(name = "return_code")
    private String returnCode;
    @JSONField(name = "return_msg")
    private String returnMsg;
    @JSONField(name = "return_code")
    private String resultCode;
    @JSONField(name = "pay_type")
    private String payType;
    @JSONField(name = "user_id")
    private String userId;
    @JSONField(name = "merchant_name")
    private String merchantName;
    @JSONField(name = "return_code")
    private String merchantNo;
    @JSONField(name = "terminal_id")
    private String terminalId;
    @JSONField(name = "terminal_trace")
    private String terminalTrace;
    @JSONField(name = "terminal_time")
    private String terminalTime;
    @JSONField(name = "pay_trace")
    private String payTrace;
    @JSONField(name = "pay_time")
    private String payTime;
    @JSONField(name = "total_fee")
    private String totalFee;
    @JSONField(name = "end_time")
    private String endTime;
    @JSONField(name = "out_trade_no")
    private String outTradeNo;
    @JSONField(name = "channel_trade_no")
    private String channelTradeNo;
    @JSONField(name = "attach")
    private String attach;
    @JSONField(name = "receipt_fee")
    private String receiptFee;
    @JSONField(name = "key_sign")
    private String keySign;
    private String sourceJson;

    public boolean isSuccess() {
        return "01".equals(returnCode) && "01".equals(resultCode);
    }
}
